﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace FirmaTransportowa
{
    public class ManagerSalariesListForm : Form
    {
        public DataGridView salariesList;
        private Label label1;

        ManagerPanelPresenter presenter;

        public ManagerSalariesListForm(ManagerPanelPresenter presenter)
        {
            this.presenter = presenter;
            InitializeComponent();
            this.Show();
        }

        public void showDataTable()
        { 
            salariesList.Columns[0].HeaderText = "ID wypłaty";
            salariesList.Columns[1].HeaderText = "Imię";
            salariesList.Columns[2].HeaderText = "Nazwisko";
            salariesList.Columns[3].HeaderText = "Zawód";
            salariesList.Columns[4].HeaderText = "Data wypłaty";
            salariesList.Columns[5].HeaderText = "Kwota wypłaty";
            salariesList.Columns[0].Width = 60;
            salariesList.Columns[1].Width = 100;
            salariesList.Columns[2].Width = 100;
            salariesList.Columns[3].Width = 100;
            salariesList.Columns[4].Width = 100;
            salariesList.Columns[5].Width = 100;
        }
            

        private void InitializeComponent()
        {
            this.salariesList = new System.Windows.Forms.DataGridView();
            this.label1 = new System.Windows.Forms.Label();
            ((System.ComponentModel.ISupportInitialize)(this.salariesList)).BeginInit();
            this.SuspendLayout();
            // 
            // salariesList
            // 
            this.salariesList.AllowUserToAddRows = false;
            this.salariesList.AllowUserToDeleteRows = false;
            this.salariesList.AllowUserToResizeColumns = false;
            this.salariesList.AllowUserToResizeRows = false;
            this.salariesList.BackgroundColor = System.Drawing.SystemColors.Window;
            this.salariesList.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            this.salariesList.Location = new System.Drawing.Point(12, 40);
            this.salariesList.Name = "salariesList";
            this.salariesList.ReadOnly = true;
            this.salariesList.Size = new System.Drawing.Size(625, 267);
            this.salariesList.TabIndex = 0;
            // 
            // label1
            // 
            this.label1.AutoSize = true;
            this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
            this.label1.Location = new System.Drawing.Point(12, 12);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(143, 17);
            this.label1.TabIndex = 2;
            this.label1.Text = "Lista wynagrodzeń";
            // 
            // ManagerSalariesListForm
            // 
            this.ClientSize = new System.Drawing.Size(649, 319);
            this.Controls.Add(this.label1);
            this.Controls.Add(this.salariesList);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
            this.HelpButton = true;
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.Name = "ManagerSalariesListForm";
            this.Text = "Lista wynagrodzeń";
            this.HelpButtonClicked += new System.ComponentModel.CancelEventHandler(this.ManagerSalariesListForm_HelpButtonClicked);
            ((System.ComponentModel.ISupportInitialize)(this.salariesList)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        private void ManagerSalariesListForm_HelpButtonClicked(object sender, System.ComponentModel.CancelEventArgs e)
        {
            HelpUtils.showHelp(this, 29);
        }

        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
        {
            if (keyData == Keys.F1)
            {
                HelpUtils.showHelp(this, 29);
                return true;
            }
            return base.ProcessCmdKey(ref msg, keyData);
        }
    }
}
